package com.morningstar.controller;

import com.morningstar.entity.ExternalConfiguration;
import com.morningstar.uitls.TimerUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @className: TestController
 * @description: 测试类请求处理器
 * @author: LiuZhenHe
 * @date: 2023/10/16 13:58
 **/
@RequestMapping("/test")
@RestController
public class TestController {

    @Autowired
    static ExternalConfiguration externalConfiguration;

//    @GetMapping("/getCloudInfo")
//    public String getCloudInfo() {
//        String cloudInfo = "云服务地址" + externalConfiguration.getAddress() + "账号：" + externalConfiguration.getAccount() + "密码：" + externalConfiguration.getPassword();
//        return cloudInfo;
//    }

    /**
     * 自动任务练习
     */
    @GetMapping("/testScheduled")
    public void testScheduled() {
        TimerUtils timerUtils = new TimerUtils();
        timerUtils.myTask();
    }

}
